package com.zhao.data.redis;

import java.io.Serializable;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;

/**
 * Redis Pub/Sub 消息接收器
 * 
 * @author zhaoyongfei
 *
 */
public class DefaultMessageDelegate implements MessageDelegate {

	@Autowired
	RedisTemplate<String, Object> redisTemplate;

	@Override
	public void handleMessage(String message) {
		System.out.println(message);
	}

	@Override
	public void handleMessage(Map<String, Object> message) {
		System.out.println("2" + message);
	}

	@Override
	public void handleMessage(byte[] message) {
		System.out.println("3" + message);
	}

	@Override
	public void handleMessage(Serializable message) {
		System.out.println("4" + message);
	}

	@Override
	public void handleMessage(Serializable message, String channel) {
		System.out.println("5" + message);
	}

}
